import { createApp } from 'vue'
import App from '@/App.vue'
//引入element-plus插件与样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 全局样式
import '@/styles/index.scss'
//svg插件需要配置代码
import 'virtual:svg-icons-register'
// 国际化 ts忽略检查
//@ts-expect-error
import zhCN from 'element-plus/dist/locale/zh-cn.mjs'
import GlobalComponent from '@/components'
import router from './router'
import pinia from './store'
import './permisstion'
//获取应用实例对象
const app = createApp(App)

// 全局组件
// import SvgIcon from '@/components/SvgIcon/index.vue'
// app.component('SvgIcon', SvgIcon)

// 引入定义插件
app.use(GlobalComponent)
//将应用挂载到挂载点上
app.use(ElementPlus)
app.use(router)
app.use(pinia)

// 中文
app.use(ElementPlus, {
  locale: zhCN,
})

app.mount('#app')
